<template>
  <div>
    <Card>
      <Row :gutter="20">
        <Col span="4" style="text-align: right">合作伙伴名称</Col>
        <Col span="20">{{ detailRow.partnerName }}</Col>
      </Row>
      <Row :gutter="20">
        <Col span="4" style="text-align: right">logo图片</Col>
        <Col span="20"><img :src="detailRow.partnerPic" style="height: 200px" /></Col>
      </Row>
      <Row :gutter="20">
        <Col span="4" style="text-align: right">联系人</Col>
        <Col span="20">{{ detailRow.partnerContact }}</Col>
      </Row>
      <Row :gutter="20">
        <Col span="4" style="text-align: right">联系电话</Col>
        <Col span="20">{{ detailRow.partnerPhone }}</Col>
      </Row>
      <Row :gutter="20">
        <Col span="4" style="text-align: right">合作伙伴介绍</Col>
        <Col span="20">
          <div class="box-border" v-html="detailRow.partnerDesc"></div
        ></Col>
      </Row>
    </Card>
  </div>
</template>

<script>
import * as API_Pather from "@/api/pather.js";

export default {
  name: "pather-detail",
  data() {
    return {
      detailRow: {}, // 详情表单
    };
  },
  mounted() {
    let id = this.$route.query.id;
    this.init(id);
  },
  methods: {
    // 返回上级
    toback() {
      this.$store.commit("removeTag", "pather-detail");
      this.$router.go(-1);
    },
    // 初始化数据
    init(id) {
      let form = {
        id: null,
        partnerPic: null, // 合作伙伴LOGO
        partnerName: null, // 合作伙伴名称
        partnerContact: null, // 联系人
        partnerPhone: null, // 联系电话
        partnerDesc: null, // 合作伙伴介绍
      };
      if (id) {
        API_Pather.getPatherDetail(id).then((res) => {
          if (res.success) {
            this.detailRow = Object.assign(form, res.result);
          }
        });
      } else {
        this.$Message.success("缺少合作伙伴ID");
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.ivu-row {
  min-height: 60px;
  height: auto;
}
.box-border {
  min-height: 60px;
  width: 80%;
  padding: 30px;
  height: auto;
  overflow: hidden;
  border: 1px solid #e7e7e7;
}
::v-deep ol li {
  list-style: decimal !important;
  text-indent: 0;
}

::v-deep ul li {
  list-style: disc !important;
  text-indent: 0;
}
</style>
